<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>

<%@page import="com.swt.mto.thithu.model.Result"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<aui:form>
	<table border="1">
	<tr>
		<td>Quiz</td>
		<td>User Name</td>
		<td>Correct Sentence</td>
		<td>Total Sentence</td>
		<td>Score</td>
	</tr>
	<%
		if(request.getAttribute("listResult")!= null){
			List<Result> results = (List<Result>)request.getAttribute("listResult");
			for(Result result : results){
			%>
				<portlet:renderURL var="getInfoUser">
					<portlet:param name="userId" value="<%=String.valueOf(result.getUserId()) %>"/>
					<portlet:param name="jspPage" value="/html/exam/userInfo.jsp"/>
				</portlet:renderURL>
				<tr>
					<td><%=result.getQuizId() %></td>
					<td><a href="<%=getInfoUser%>"><%=result.getUserName() %></a></td>
					<td><%=result.getNumSentenceCorrect() %></td>
					<td><%=result.getTotalSentence() %></td>
					<td><%=result.getScore() %></td>
				</tr>			
			<%
			}
		}
	%>
	</table>
</aui:form>